<?php
set_time_limit(0);
 
include '../c/config.php';  
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
 if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqli->error);}
$nianji=9;

$query=$mysqli->query("select phone from s".$nianji." group by phone having count(phone) >1");
$phone =array();
while ($list = $query->fetch_assoc()) {
    $phone[]=$list['phone'];
}

foreach ($phone as $key => $value) {
	 $query=$mysqli->query("select * from s".$nianji." where phone='".$value."' ");
 
	 while ($list = $query->fetch_assoc()) {
	     var_dump($list);
	     echo "<br />";
	 }


	 echo "<br /><br />";

}
